package view.actions;

import beans.UsuarioTo;
import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import negocio.VentasManager;
import negocio.VentasManagerException;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import utildb.TransactionException;
import view.forms.ingresarLoginForm;
import view.forms.registrarUsuarioForm;


public class RegistrarUsuarioAction extends Action {
    String cBuscar;
    String cadentmp;
    public ActionForward execute(ActionMapping mapping,
                                 ActionForm form,
                                 HttpServletRequest request, 
                                 HttpServletResponse response) throws IOException, 
                                                                      ServletException, 
                                                                      VentasManagerException,
                                                                      TransactionException {
        //      --------
        VentasManager pmg = new VentasManager();
        HttpSession session  = request.getSession(false);

        registrarUsuarioForm objform;
        objform = (registrarUsuarioForm) form;

        objform.setCnom_Usua("hola");
        request.setAttribute("cnom_Usua", "HolaD" );
        return mapping.findForward( "success");
    }
}
